Skip to content

feat(aiPlatformConfiguration): add contextMemory tuning block#27455

Merged
pmbrull merged 3 commits intomainfrom
context-memory-config-collate
Apr 17, 2026
Merged

feat(aiPlatformConfiguration): add contextMemory tuning block#27455
pmbrull merged 3 commits intomainfrom
context-memory-config-collate

Conversation

@pmbrull
Copy link
Copy Markdown
Collaborator

@pmbrull pmbrull commented Apr 17, 2026

Summary

Adds a contextMemory sub-config to aiPlatformConfiguration so deployments can tune the T0 user-preference memory block that Collate ships to the AI Platform via the gRPC user_memory_context field without code changes.

aiPlatformConfiguration:
  contextMemory:
    tokenBudget: 500    # max tokens of T0 memory to emit
    maxItems: 5         # max memories to emit (whichever hits first)

Both fields default to the values previously hard-coded in Collate's `ContextMemoryRetrievalService` (500 tokens / 5 items), so existing deployments behave identically.

This is paired with the Collate PR that reads this config at service construction time and passes it into `ContextMemoryRetrievalService`.

Test plan

  • Schema compiles — `mvn -pl openmetadata-spec install` regenerates `ContextMemoryConfiguration.java` cleanly
  • Collate PR consuming this field passes its own unit tests against the new schema

🤖 Generated with Claude Code

Expose T0 user-preference memory retrieval limits (tokenBudget, maxItems)
via aiPlatformConfiguration.contextMemory so deployments can tune the
block that Collate ships to the AI Platform via the gRPC
user_memory_context field without code changes.

Both fields default to the values previously hard-coded in Collate's
ContextMemoryRetrievalService (500 tokens, 5 items), so existing
deployments behave identically.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 17, 2026 07:48
@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Apr 17, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an optional contextMemory sub-configuration to the AI Platform configuration schema so deployments can tune how much T0 “user preference” memory Collate emits via the gRPC user_memory_context field.

Changes:

  • Introduces a contextMemoryConfiguration schema definition with tokenBudget and maxItems (defaults 500 / 5).
  • Adds a new contextMemory property to AiPlatformConfiguration referencing the new definition.

@github-actions
Copy link
Copy Markdown
Contributor

✅ TypeScript Types Auto-Updated

The generated TypeScript types have been automatically updated based on JSON schema changes in this PR.

@github-actions github-actions Bot requested a review from a team as a code owner April 17, 2026 07:52
Copilot AI review requested due to automatic review settings April 17, 2026 08:54
@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 17, 2026

Code Review ✅ Approved

Introduces the contextMemory tuning block to the AI platform configuration. No issues were found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated no new comments.

@github-actions
Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.73% (59642/93585) 43.65% (31392/71908) 46.73% (9433/20182)

@sonarqubecloud
Copy link
Copy Markdown

@sonarqubecloud
Copy link
Copy Markdown

@pmbrull pmbrull merged commit f8979cf into main Apr 17, 2026
72 of 74 checks passed
@pmbrull pmbrull deleted the context-memory-config-collate branch April 17, 2026 10:48
@github-actions
Copy link
Copy Markdown
Contributor

🔴 Playwright Results — 1 failure(s), 23 flaky

✅ 3639 passed · ❌ 1 failed · 🟡 23 flaky · ⏭️ 111 skipped

Shard Passed Failed Flaky Skipped
🔴 Shard 1 453 1 4 26
🟡 Shard 2 649 0 2 7
🟡 Shard 3 657 0 3 1
🟡 Shard 4 632 0 2 27
✅ Shard 5 611 0 0 42
🟡 Shard 6 637 0 12 8

Genuine Failures (failed on all attempts)

Features/DataAssetRulesDisabled.spec.ts › Verify the Chart entity item action after rules disabled (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoContainText�[2m(�[22m�[32mexpected�[39m�[2m)�[22m failed

Locator: getByTestId('domain-link')
Expected substring: �[32m"PW Domain �[7m5b098515�[27m"�[39m
Received string:    �[31m"PW Domain �[7m154863d1�[27m"�[39m
Timeout: 15000ms

Call log:
�[2m  - Expect "toContainText" with timeout 15000ms�[22m
�[2m  - waiting for getByTestId('domain-link')�[22m
�[2m    19 × locator resolved to <a data-testid="domain-link" href="/domain/%22PW%25domain.154863d1%22" class="no-underline domain-link domain-link-text font-medium text-sm render-domain-lebel-style">PW Domain 154863d1</a>�[22m
�[2m       - unexpected value "PW Domain 154863d1"�[22m

🟡 23 flaky test(s) (passed on retry)
  • Features/DataAssetRulesDisabled.spec.ts › Verify the ApiEndpoint entity item action after rules disabled (shard 1, 2 retries)
  • Features/DataAssetRulesDisabled.spec.ts › Verify the Directory entity item action after rules disabled (shard 1, 2 retries)
  • Pages/AuditLogs.spec.ts › should apply both User and EntityType filters simultaneously (shard 1, 2 retries)
  • Pages/UserCreationWithPersona.spec.ts › Create user with persona and verify on profile (shard 1, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/ChangeSummaryBadge.spec.ts › Automated badge should appear on entity description with Automated source (shard 2, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Pages/Customproperties-part2.spec.ts › entityReferenceList shows item count, scrollable list, no expand toggle (shard 4, 1 retry)
  • Pages/DataContractsSemanticRules.spec.ts › Validate Owner Rule Not_In (shard 4, 1 retry)
  • Pages/Glossary.spec.ts › Column dropdown drag-and-drop functionality for Glossary Terms table (shard 6, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Mlmodel (shard 6, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Spreadsheet (shard 6, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Worksheet (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageInteraction.spec.ts › Verify cycle lineage should be handled properly (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab is NOT visible for dashboardService in platform lineage (shard 6, 1 retry)
  • Pages/Lineage/PlatformLineage.spec.ts › Verify domain platform view (shard 6, 1 retry)
  • Pages/Users.spec.ts › Create and Delete user (shard 6, 1 retry)
  • Pages/Users.spec.ts › Permissions for table details page for Data Consumer (shard 6, 1 retry)
  • VersionPages/EntityVersionPages.spec.ts › Directory (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

pmbrull added a commit that referenced this pull request Apr 20, 2026
* feat(aiPlatformConfiguration): add contextMemory tuning block

Expose T0 user-preference memory retrieval limits (tokenBudget, maxItems)
via aiPlatformConfiguration.contextMemory so deployments can tune the
block that Collate ships to the AI Platform via the gRPC
user_memory_context field without code changes.

Both fields default to the values previously hard-coded in Collate's
ContextMemoryRetrievalService (500 tokens, 5 items), so existing
deployments behave identically.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Update generated TypeScript types

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants